import React, { useState, useEffect } from 'react'
import { Text, View } from '@tarojs/components'
import { AtRate } from 'taro-ui'
import "taro-ui/dist/style/components/rate.scss";
import "taro-ui/dist/style/components/icon.scss";
const index = (props) => {
    const { data = {}, index, ChangeValue } = props
    const {
        title,
        label,
        require = false,
        desc,
        value,

    } = data


    return <View className='CollectWps_box_content'>
        <View className='CollectWps_label'>{require && <Text style={{ color: "red", right: 4 }}>*</Text>}{label}</View>
        <View className='CollectWps_desc'>{desc}</View>
        <View>
            <AtRate value={value} onChange={val => ChangeValue({ index, value: { value: val } })} />

        </View>

    </View>
}
export default index